package com.yunxi.module.system.mapper.social;

import com.yunxi.framework.mybatis.core.mapper.BaseMapperX;
import com.yunxi.module.system.model.social.SocialClientDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 社交客户端 mapper
 * </p>
 *
 * @author lidy
 * @since 2024-05-08
 */
@Mapper
public interface SocialClientMapper extends BaseMapperX<SocialClientDO> {

    /**
     * 根据社交平台类型和用户类型查询社交客户端
     *
     * @param socialType 社交平台类型
     * @param userType   用户类型
     * @return 社交客户端
     */
    default SocialClientDO selectBySocialTypeAndUserType(Integer socialType, Integer userType) {
        return selectOne(SocialClientDO::getSocialType, socialType, SocialClientDO::getUserType, userType);
    }
}
